package org.edu.modules.veTeachCourse.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
import org.edu.modules.veTeachCourse.entity.VeTeachCourse;
import org.edu.modules.veTeachCourse.mapper.VeTeachCourseMapper;
import org.edu.modules.veTeachCourse.service.IVeTeachCourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class VeTeachCourseServiceImpl
        extends ServiceImpl<VeTeachCourseMapper, VeTeachCourse>
        implements IVeTeachCourseService
{
    @Autowired
    VeTeachCourseMapper veTeachCourseMapper;

    public boolean saveSouce(VeTeachCourse veTeachCourse)
    {
        return SqlHelper.retBool(Integer.valueOf(((VeTeachCourseMapper)getBaseMapper()).insert(veTeachCourse)));
    }

    public VeTeachCourse getByWeightId(int weightId)
    {
        return this.veTeachCourseMapper.getByWeightId(weightId);
    }
}
